<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Javamall</title>
    <link rel="stylesheet" href="/common/css/base.css">
    <link rel="stylesheet" href="/common/css/index_head.css">
    <link rel="stylesheet" href="/common/css/footer.css">
    <link rel="stylesheet" href="/common/css/swiper.css">
    <link rel="stylesheet" href="/index/css/index.css">
    <link rel="stylesheet" href="/index/css/banner.css">
</head>

<body>
<div class='header'>
    <div class="top">
        <div class="w clearfix">
            <div class='setNav fr'>
                <ul>
                    <li id="userFather">
                        <a th:if="${session.loginUser == null}" id="login_btn" href="http://localhost:11000/auth/login.html" >
                            登录
                        </a>
                        <a th:if="${session.loginUser == null}" href="http://localhost:11000/auth/reg.html">
                            注册
                        </a>
                        <a th:if="${session.loginUser != null}">
                            欢迎, [[${session.loginUser.nickname}]]
                        </a>
                        <a th:if="${session.loginUser != null}" href="http://localhost:11000/auth/logout.html">
                            立即退出
                        </a>
                    </li>
                    <li class="line">
                    </li>
                    <li>
                        <a href="http://localhost:11000/orderList.html">我的订单</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <!-- //顶部按钮区域结束 -->
    <div class="w">
        <div class="top_search clearfix">
            <a href="http://localhost:11000">
                <div class="logo fl">
                    <h1></h1>
                </div>
            </a>
            <div class="search fl">
                <form action="http://localhost:11000/list.html" method="get">
                    <input name="keyword" type="text" id="ipt" placeholder="">
                    <button>搜索</button>
                    <ul id="list"></ul>
                </form>
            </div>
            <div class="shop_car fr">
                <a href="http://localhost:11000/cart/cart.html">购物车</a>
            </div>
        </div>
    </div>
    <!-- logo及 搜索框结束 -->
    <div class="w">
        <div class="tab clearfix">
            <div class="fl s_show">
                <a href="" class="logo_s"></a>
            </div>
            <ul class="fl clearfix" >
                <li class="tabItem">
                    <a href="http://localhost:11000">首页</a>
                </li>
                <li class="tabItem" th:each="cat1:${category}">
                    <a href="" th:text="${cat1.getName()}">居家生活</a>
                    <div class="tabChild clearfix">
                        <dl th:each="cat2:${cat1.getCat2()}">
                            <dt th:text="${cat2.getName()}">夏季焕新</dt>
                            <dd th:each="cat3:${cat2.getCat3()}">
                                <a th:href="@{'/list.html?catalog3Id='+${cat3.getId()}}">
                                    <span th:text="${cat3.getName()}">夏凉尝鲜</span>
                                </a>
                            </dd>
                        </dl>
                    </div>
                </li>
            </ul>

            <div class="fr s_show">
                <span class="log fl">
                        <ul class='setItem'>
                            <li th:if="${session.loginUser == null}">
                                <a href="http://localhost:11000/auth/login.html" >
                                    登录
                                </a>
                            </li>
                            <li th:if="${session.loginUser == null}">
                                <a href="http://localhost:11000/auth/reg.html">
                                    注册
                                </a>
                            </li>
                            <li th:if="${session.loginUser != null}">
                                <a href="http://localhost:11000/auth/logout.html">
                                    退出
                                </a>
                            </li>
                        </ul>
                    </span>
                <a href="http://localhost:11000/cart/cart.html">
                    <span class="show_car fl">
                    </span>
                </a>
            </div>
        </div>

    </div>
    <!-- tab区域结束 -->
</div>
<!-- 头部区域结束 -->
<!-- banner轮播部分开始 -->

<div class="container swiper-container">
    <div class="wrapper swiper-wrapper">
        <div class="slide swiper-slide" th:each="item : ${indexAdv.get(0)}">
            <a th:href="@{item.url}"><img th:src="${item.pic}" alt=""></a>
        </div>
    </div>
    <div class="next-button"> > </div>
    <div class="prev-button"> < </div>
    <div class="pagination">

    </div>
</div>
<script src="/index/javascripts/libs/swiper.js"></script>
<script src="/index/javascripts/libs/jquery.js"></script>
<script src="/index/javascripts/libs/banner.js"></script>


<!-- banner轮播部分结束 -->
<!-- 品牌制造 OBM商开始 -->
<div class="obm w">
    <div class="con_header clearfix">
        <div class="h_left fl">
            <a href="searchlist.html" class="fl">
                <h2 class="h_name">品牌制造商</h2>
            </a>
            <span class="fl">工厂直达消费者，剔除品牌溢价</span>
        </div>
        <div class="h_left fr">
            <a href="#">更多制造商 &gt;</a>
        </div>
    </div>
    <div class="obm_body clearfix">
        <div class="con_item" th:each="item:${indexAdv.get(1)}">
            <a th:href="${item.url}">
                    <span class="con_t" th:text="${item.name}">海外制造商

                    </span>
                <img th:src="${item.pic}" src="/index/img/obm1.png" alt="" class="bg">
            </a>
        </div>

    </div>
</div>
<!-- 品牌制造商OBM结束 -->
<!-- 新品首发开始 -->
<div class="new_product w">
    <div class="con_header clearfix">
        <div class="h_left fl">
            <a href="searchlist.html" class="fl">
                <h2 class="h_name">新品首发</h2>
            </a>
            <span class="fl">为你寻觅世间好物</span>
        </div>
        <div class="h_left fr">
            <a href="#">更多新品 &gt;</a>
        </div>
    </div>
    <div class="np_body">
        <div class="autoM">
            <ul>
                <li>
                    <div class="new_item" th:each="item:${indexAdv.get(2)}">
                        <a th:href="${item.url}" href="#" class="img_change">
                            <img th:src="${item.pic}" src="/index/img/np1.png" alt="">
                        </a>
                        <div class="special"></div>
                        <h5 th:text="${item.name}">儿童夏凉遮腿裤4-16岁</h5>
                        <!--<p><span class="price">￥29</span></p>-->
                    </div>
                </li>
            </ul>
        </div>
        <!-- <div class="left">&lt;</div>
        <div class="right"> &gt;</div> -->
    </div>
</div>
<!-- 新品首发结束 -->


<script src="/common/js/jquery.js"></script>
<script src="/common/js/utils.js"></script>
<!--<script src='/common/js/index.js'></script>-->


</body>
</html>